﻿using System;
using System.Linq;

/// <summary>
/// 临时配置项, 后期为读取配置信息表返回, 为中转接口, 后期重构
/// </summary>
public class PdrPathHelper
{

    #region 资源检测配置
    public static string[] FilterTexturePath = new[]
    {
        "/App/",
        "/"+ Config.ORIGINAL_PATH +"/" + Config.UI_PATH + "/atlas/",
        "/TP/"
    };

    public static string[] FilterTextureSuffix = new[]
    {
        ".renderTexture",
    };

    #endregion

    //过滤路径
    public static bool IsFilterTexturePath(string path)
    {
        path = path.Replace("\\", "/");
        if (FilterTexturePath.Any(uPath => path.IndexOf(uPath, StringComparison.Ordinal) != -1))
        {
            return true;
        }
        return FilterTextureSuffix.Any(uPath => path.EndsWith(uPath));
    }
}
